
package ui.adapter;

import android.content.Context;

import net.ck.hzq.R;

import java.util.ArrayList;
import java.util.List;

import Utils.StringUtil;
import base.BaseViewHolder;
import base.SuperBaseAdapter;
import ui.model.RewardsBean;


/**
 * 新钱包奖励适配器
 * Created by chenjian on 19/2/27.
 */
public class RewardsAdapter extends SuperBaseAdapter<RewardsBean> {

    List<RewardsBean> mData = new ArrayList<>();
    Context mContext;

    public RewardsAdapter(Context context, List<RewardsBean> data) {
        super(context, data);
        mContext = context;
        mData = data;
    }

    @Override
    protected void convert(BaseViewHolder holder, final RewardsBean item, final int position) {
        holder.setText(R.id.item_rewards_name, item.getLayout()).setText(R.id.item_rewards_money, StringUtil.getFormatPrice(item.getAmount()) + "元");
    }


    @Override
    protected int getItemViewLayoutId(int position, RewardsBean item) {
        return R.layout.item_rewards;
    }

}
